//
//  UserSettingViewController.h
//  Growth
//
//  Created by  on 12-2-8.
//  Copyright (c) 2012年 MEETStudio. All rights reserved.
//

#import <UIKit/UIKit.h>


#import "WebRequest.h"
#import "WebConnetionArray.h"
#import "WebConnection.h"
#import "SDImageView+SDWebCache.h"
#import "Photo.h"
#import "CJSONScanner.h"
#import "CJSONDeserializer.h"
#import "CJSONSerializer.h"
#import "DCRoundSwitch.h"
#import "GrowthAppDelegate.h"

#import <QuartzCore/QuartzCore.h>

#import "ASIHTTPConnection.h"


@interface UserSettingViewController :  BaseViewController<UITextFieldDelegate,
UINavigationControllerDelegate,
UIImagePickerControllerDelegate,
UITextViewDelegate,
UIPickerViewDelegate,
UIPickerViewDataSource,
UIActionSheetDelegate,
UIActionSheetDelegate,
UIAlertViewDelegate,
ASIHTTPConnectionDelegate,
UIScrollViewDelegate
>{
    UIView *bgView;
    UIView *passwordSettingBgView;
    
    UITextField *passwordTextField;
    
    int userId;
    
    UILabel *birthdayLabel;
    
    DCRoundSwitch *genderSwitch;
    NSString *gender;
    
    UITextField *emailTextField;
    UITextField *phone1TextField;
    
    //camera
    UIImageView *photoImageView;
    BOOL isPhotoChange;

    NSDictionary *userInfoDict;

    bool _isPostModify;
    BOOL _isPostUserIcon;
    
   IBOutlet UIActivityIndicatorView *activityIndicatorView;
    
    IBOutlet UITextField *nameField;
    
    //
    IBOutlet UITextField *phone2TextField;
    IBOutlet UITextField *mailCodeTextField;
    IBOutlet UITextField *workCompanyTextField;
    IBOutlet UITextField *homeAddresd;
    
    IBOutlet UIScrollView *myScrollView;
    
    IBOutlet UIButton *backGroundButton;
    
    UITextField *curEditTextField;
}
@property (nonatomic, retain) IBOutlet UIView *bgView;
@property (nonatomic, retain) IBOutlet UIView *passwordSettingBgView;

@property (nonatomic, retain) IBOutlet UITextField *passwordTextField;

@property (nonatomic) int userId;

@property (nonatomic, retain) IBOutlet UILabel *birthdayLabel;

@property (nonatomic, retain) IBOutlet DCRoundSwitch *genderSwitch;
@property (nonatomic, retain)  NSString *gender;

@property (nonatomic, retain) IBOutlet UITextField *emailTextField;
@property (nonatomic, retain) IBOutlet UITextField *phone1TextField;

//camera
@property (nonatomic, retain) IBOutlet UIImageView *photoImageView;

@property (nonatomic,retain) NSDictionary *userInfoDict;

-(IBAction)backGoundTap:(id)sender;


//take photo action
-(IBAction)takePhoto:(id)sender;


- (void)hideLibraryButton;
-(void)addSomeElements:(UIViewController *)viewController;
-(UIView *)findView:(UIView *)aView withName:(NSString *)name;
- (void)showLibraryButton;
- (void)showLibraryButtonAfterDelay;

- (IBAction)postUserModify:(id)sender;
- (IBAction)passwordSettingAction:(id)sender;
- (IBAction)genderChangeAction:(id)sender;
-(IBAction)selectTimeValue:(id)sender;

//keyboard
- (void) registerForKeyboardNotifications;
- (void) keyboardWasHidden:(NSNotification *) notif;
- (void) keyboardWasShown:(NSNotification *) notif;


@end
